-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Maps] tighten default map zoom #56069
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
@@ -37,6 +37,10 @@ export function createMapPath(id) { | |||
return `${MAP_BASE_URL}/${id}`; | |||
} | |||
|
|||
export const DEFAULT_ZOOM = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work for large screens. Maybe instead of setting the zoom and center, we can set an initial bounding box using the options.bounds
parameter for the map?
How does it not work on large screens? Can you provide a screen shot? |
For this screenshot, I used the Responsive Design mode in Firefox to set the window size to 2560x1280. I believe what happens with this PR is we show more lines of latitude as the screen resolution gets taller. I worked up an example showing how the extent changes as screen height gets larger. The light green line is a resolution of 1366x768, the dark green is 1920x1080, and the red line is 2560x1440. |
@elasticmachine merge upstream |
@jsanz @nickpeihl Thanks for taking a look at this. I have changed the implementation from using zoom/center to using bounds. This provides a more consistent look across various screen resolutions. |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! works perfectly, even in extremely large resolutions.
* [Maps] tighten default map zoom * rework using bounds to work on multiple screen resolutions Co-authored-by: Elastic Machine <[email protected]>
* [Maps] tighten default map zoom * rework using bounds to work on multiple screen resolutions Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Change new map view from this
To
cc @VijayDoshi